#!/bin/bash

export RANGER_ADMIN_CONF_DIR=/opt/edp/ranger/conf
rm -rf /home/ranger/apache-ranger-admin/install.properties
rm -rf /home/ranger/apache-ranger-admin/db_setup.py
cp -f /opt/edp/ranger/conf/rangeradmin-install.properties  /home/ranger/apache-ranger-admin/install.properties
cp -f /opt/edp/ranger/conf/db_setup.py  /home/ranger/apache-ranger-admin/
ln -s /opt/edp/ranger/conf  /home/ranger/apache-ranger-admin/ews/webapp/WEB-INF/classes/conf
mkdir /opt/edp/ranger/log/ranger-admin
ln -s /opt/edp/ranger/log/ranger-admin  /home/ranger/apache-ranger-admin/ews/logs
cd /home/ranger/apache-ranger-admin/
sh ./setup.sh 
/usr/bin/ranger-admin start

tail -f /dev/null


